package com.bt.lms.ui.page.school_education.query_details;

import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;

/**
 *
 * 毕/结业信息界面
 */
public class PageCheckGraduate extends VBox {

    private Integer baseWidth = 1230;

    public PageCheckGraduate(PageCheckManage pageCheckManage) {
        VBox totalVBox = new VBox();
        Insets insets = new Insets(10);
        totalVBox.setPadding(insets);
        totalVBox.setPrefWidth(1200);

        HBox mesHBox = new HBox();
        mesHBox.setSpacing(600);
        Label studentBasic = new Label("招生计划A-班级1-灭霸学员就业信息");
        studentBasic.setFont(Font.font("圆体", 20));
        mesHBox.getChildren().addAll(studentBasic);
        totalVBox.getChildren().add(mesHBox);

        Label statusBasicMes = new Label("就业信息");
        statusBasicMes.setFont(Font.font("圆体",20));
        HBox hBox1 = new HBox();
        hBox1.setPrefWidth(1230);
        hBox1.setStyle("-fx-background-color: #cec9c9");
        hBox1.getChildren().add(statusBasicMes);
        totalVBox.getChildren().add(hBox1);
        totalVBox.setSpacing(10);

        ScrollPane scrollPane = new ScrollPane();
        scrollPane.setPrefWidth(1280);
        //设置滚动盒子只有竖向
        scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);

        //基本信息的主盒子
        VBox vBox = new VBox();
        vBox.setPrefWidth(baseWidth);
        vBox.setSpacing(10);

        HBox one1 = new HBox();
        one1.setPrefWidth(baseWidth);
        one1.setSpacing(10);
        Label firmLab = new Label("公司名");
        firmLab.setPrefWidth(baseWidth/8);
        Label firmTF = new Label();
        firmTF.setPrefWidth(baseWidth/4);
        Label firmSiteLab = new Label("公司地址");
        firmSiteLab.setPrefWidth(baseWidth/8);
        HBox siteHBox = new HBox();
        Label provinceLab = new Label();//省
        provinceLab.setPrefWidth(50);
        Label cityLab = new Label();//市
        cityLab.setPrefWidth(50);
        Label countyLab = new Label();//县
        countyLab.setPrefWidth(70);
        Label detailedLab = new Label();//详细地址
        siteHBox.getChildren().addAll(provinceLab,cityLab,countyLab,detailedLab);
        one1.getChildren().addAll(firmLab,firmTF,firmSiteLab,siteHBox);


        HBox two = new HBox();
        two.setPrefWidth(baseWidth);
        two.setSpacing(10);
        Label signedLab = new Label("协议签订日期");
        signedLab.setPrefWidth(baseWidth/8);
        Label signedDP = new Label();
        signedDP.setPrefWidth(baseWidth/4);
        Label registerLab = new Label("报到日期");
        registerLab.setPrefWidth(baseWidth/8);
        Label registerDP = new Label();
        registerDP.setPrefWidth(baseWidth/4);
        two.getChildren().addAll(signedLab,signedDP,registerLab,registerDP);

        HBox three = new HBox();
        three.setPrefWidth(baseWidth);
        three.setSpacing(10);
        Label firmTypeLab = new Label("企业类型");
        firmTypeLab.setPrefWidth(baseWidth/8);
        Label firmTypeCB = new Label();
        firmTypeCB.setPrefWidth(baseWidth/4);
        three.getChildren().addAll(firmTypeLab,firmTypeCB);


        HBox four = new HBox();
        four.setPrefWidth(baseWidth/4);
        four.setSpacing(10);
        Label firmDescribeLab = new Label("公司描述");
        firmDescribeLab.setPrefWidth(baseWidth/8);
        Label firmDescribeTA = new Label();
        firmDescribeTA.setPrefWidth(baseWidth/4);
        four.getChildren().addAll(firmDescribeLab,firmDescribeTA);


        vBox.getChildren().addAll(one1,two,three,four);
        totalVBox.getChildren().add(vBox);

        scrollPane.setContent(totalVBox);
        this.getChildren().add(scrollPane);

    }

    /**
     * 就业信息
     *
     * @param totalVBox 主盒子
     */
    private void initEmploymentMes(VBox totalVBox) {
        Label EmploymentMes = new Label("就业信息");
        EmploymentMes.setFont(Font.font("圆体", 20));
        HBox hBox1 = new HBox();
        hBox1.setPrefWidth(1280);
        hBox1.setStyle("-fx-background-color: #cec9c9");
        hBox1.getChildren().add(EmploymentMes);
        totalVBox.getChildren().add(hBox1);
        totalVBox.setSpacing(10);


        //就业信息的主盒子
        VBox vBox = new VBox();
        vBox.setPrefWidth(baseWidth);
        vBox.setSpacing(10);

        HBox one = new HBox();
        one.setPrefWidth(baseWidth);
        one.setSpacing(10);


        VBox one1 = new VBox();
        one1.setPrefWidth(baseWidth / 8);
        one1.setSpacing(10);
        Label agreementNumberLab = new Label("协议书编号");
        Label reportDataLab = new Label("报道日期");
        Label receptionUnitLab = new Label("接收单位");
        Label unitNatureLab = new Label("社会单位性质");
        Label fileAcceptSiteLab = new Label("档案接受地址");
        Label unitTradeLab = new Label("单位行业");
        Label DispatchFeeLab = new Label("派遣费");
        one1.getChildren().addAll(agreementNumberLab, reportDataLab, receptionUnitLab, unitNatureLab, fileAcceptSiteLab, unitTradeLab, DispatchFeeLab);
        one.getChildren().add(one1);

        VBox one2 = new VBox();
        one2.setPrefWidth(baseWidth / 6);
        one2.setSpacing(10);
        Label agreementNumberLabMes = new Label("92495242-4242");
        Label reportDataLabMes = new Label("2012年1月12日");
        Label receptionUnitLabMes = new Label();
        Label unitNatureLabMes = new Label();
        Label fileAcceptSiteLabMes = new Label();
        Label unitTradeLabMes = new Label();
        Label DispatchFeeLabMes = new Label();
        one2.getChildren().addAll(agreementNumberLabMes, reportDataLabMes, receptionUnitLabMes, unitNatureLabMes, fileAcceptSiteLabMes, unitTradeLabMes, DispatchFeeLabMes);
        one.getChildren().add(one2);


        VBox one3 = new VBox();
        one3.setPrefWidth(baseWidth / 8);
        one3.setSpacing(10);
        Label signedDataLab = new Label("协议签订日期");
        Label practicableWayLab = new Label("就业落实方式");
        Label unitRegionLab = new Label("单位所在地区");
        Label economicNatureLab = new Label("单位经济性质");
        Label acceptPostalCodeLab = new Label("接收地邮政编码");
        Label reportIDLab = new Label("报道证号");
        one3.getChildren().addAll(signedDataLab, practicableWayLab, unitRegionLab, economicNatureLab, acceptPostalCodeLab, reportIDLab);
        one.getChildren().add(one3);

        VBox one4 = new VBox();
        one4.setPrefWidth(baseWidth / 6);
        one4.setSpacing(10);
        Label signedDataLabMes = new Label("2010年11月31日");
        Label practicableWayLabMes = new Label("北京清华大学");
        Label unitRegionLabMes = new Label("北京市朝阳区太平桥北城建大厦");
        Label economicNatureLabMes = new Label();
        Label acceptPostalCodeLabMes = new Label();
        Label reportIDLabMes = new Label();
        one4.getChildren().addAll(signedDataLabMes, practicableWayLabMes, unitRegionLabMes, economicNatureLabMes, acceptPostalCodeLabMes, reportIDLabMes);
        one.getChildren().add(one4);

        VBox one5 = new VBox();
        one5.setPrefWidth(baseWidth / 8);
        one5.setSpacing(10);
        Label protocolLimitLab = new Label("协议年限");
        Label graduateWhereLab = new Label("毕业去向");
        Label competentDepartmentLab = new Label("单位主管部门");
        Label treatmentLab = new Label("单位提供的待遇");
        Label postNatureLab = new Label("工作岗位性质");
        Label EmploymentFormLab = new Label("用人单位用人形式");
        one5.getChildren().addAll(protocolLimitLab, graduateWhereLab, competentDepartmentLab, treatmentLab, postNatureLab, EmploymentFormLab);
        one.getChildren().add(one5);

        VBox one6 = new VBox();
        one6.setPrefWidth(baseWidth / 6);
        one6.setSpacing(10);
        Label protocolLimitLabMes = new Label("3年");
        Label graduateWhereLabMes = new Label("北京");
        Label competentDepartmentLabMes = new Label("产品部");
        Label treatmentMes = new Label("四险一金，节假日红包");
        Label postNatureLabMes = new Label();
        Label EmploymentFormLabMes = new Label();
        one6.getChildren().addAll(protocolLimitLabMes, graduateWhereLabMes, competentDepartmentLabMes, treatmentMes, postNatureLabMes, EmploymentFormLabMes);
        one.getChildren().add(one6);
        vBox.getChildren().add(one);
        totalVBox.getChildren().add(vBox);

    }
}